package com.zpz.framework.zpzoauth.web;

import com.zpz.framework.zpzoauth.common.result.ZpzOauthResultMsg;
import com.zpz.framework.zpzoauth.pojo.qo.TraceQo;
import com.zpz.framework.zpzoauth.pojo.vo.TraceVo;
import com.zpz.framework.zpzoauth.service.ZpzOauthOauthClientDetailsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * @author zhangpanzhi
 * @description
 * @create 2019-08-07 10:43
 */
@Api(tags = "客户端信息管理")
@RestController
@RequestMapping(value = "/zpzOauthOauthClientDetails")
public class ZpzOauthOauthClientDetailsController {
    @Resource
    private ZpzOauthOauthClientDetailsService zpzOauthOauthClientDetailsService;

    @ApiOperation(value = "获取客户端ID信息集合（100054） |适用于（） |负责人：zhangpanzhi",
            notes = "  \n 数据安全：无," +
                    "  \n返回码：0（OK），")
    @PostMapping(value = "/getClientDetails")
    public ZpzOauthResultMsg<List<String>> getClientDetails(HttpServletRequest request) throws Exception{
        return zpzOauthOauthClientDetailsService.getClientDetails(request);
    }
    @ApiOperation(value = "获取初始参数（100055） |负责人：zhangpanzhi",
            notes = "  \n 数据安全：无," +
                    "  \n返回码：0（OK），")
    @PostMapping(value = "/trace")
    public ZpzOauthResultMsg<TraceVo> trace(HttpServletRequest request, @RequestBody TraceQo traceQo) throws Exception{
        return zpzOauthOauthClientDetailsService.trace(traceQo);
    }
}
